<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Cencat SaaS - 安全设置</title>
  <script src="https://cdn.tailwindcss.com"></script>
  <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
  
  <script>
    tailwind.config = {
      theme: {
        extend: {
          colors: {
            primary: '#165DFF',
            secondary: '#36CFC9',
            success: '#52C41A',
            warning: '#FAAD14',
            danger: '#FF4D4F',
            info: '#40A9FF',
            dark: '#1D2129',
            'dark-2': '#4E5969',
            'light-1': '#F2F3F5',
            'light-2': '#E5E6EB',
            'light-3': '#C9CDD4'
          },
          fontFamily: {
            inter: ['Inter', 'system-ui', 'sans-serif'],
          },
          boxShadow: {
            'card': '0 2px 14px 0 rgba(0, 0, 0, 0.06)',
            'card-hover': '0 6px 20px 0 rgba(0, 0, 0, 0.1)',
            'dropdown': '0 4px 16px rgba(0, 0, 0, 0.12)',
            'modal': '0 10px 30px -5px rgba(0, 0, 0, 0.1)',
          }
        },
      }
    }
  </script>
  
  <style>
    body { font-family: 'Inter', system-ui, sans-serif; overflow-x: hidden; }
    html { scroll-behavior: smooth; }
    .progress-bar { transition: width 1s ease-in-out; }
    .table-row-hover { transition: background-color 0.2s ease; }
    .table-row-hover:hover { background-color: rgba(242, 243, 245, 0.5); }
    
    @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
    @keyframes slideIn { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
    .animate-fade-in { animation: fadeIn 0.3s ease-in-out; }
    .animate-slide-in { animation: slideIn 0.3s ease-out; }
  </style>
</head>

<body class="bg-light-1 text-dark overflow-x-hidden">
  <div class="flex h-screen">
    <!-- 侧边栏导航 -->
    <aside id="sidebar" class="w-64 bg-white h-full shadow-md fixed left-0 top-0 z-30 transition-all duration-300 transform md:translate-x-0 -translate-x-full">
      <div class="p-4 border-b border-light-2 flex items-center space-x-3">
        <div class="w-10 h-10 bg-primary rounded-lg flex items-center justify-center">
          <i class="fa fa-cubes text-white text-xl"></i>
        </div>
        <div>
          <h1 class="text-lg font-bold text-primary">Cencat SaaS</h1>
          <p class="text-xs text-dark-2">多租户管理平台</p>
        </div>
        <button id="close-sidebar" class="ml-auto md:hidden text-dark-2 hover:text-primary">
          <i class="fa fa-times"></i>
        </button>
      </div>
      
      <div class="p-4 border-b border-light-2">
        <div class="flex items-center space-x-3">
          <div class="w-10 h-10 bg-light-1 rounded-full overflow-hidden">
            <img src="https://picsum.photos/id/1005/200/200" alt="当前租户Logo" class="w-full h-full object-cover">
          </div>
          <div>
            <p class="font-medium text-sm">云帆科技有限公司</p>
            <p class="text-xs text-dark-2">企业版 | ID: T2025001</p>
          </div>
        </div>
        <button id="switch-tenant-btn" class="mt-3 w-full text-xs text-primary hover:text-primary/80 flex items-center justify-center space-x-1 transition-all duration-300">
          <i class="fa fa-exchange"></i>
          <span>切换租户</span>
        </button>
      </div>
      
      <nav class="p-3">
        <ul class="space-y-1">
          <li class="text-xs font-semibold text-dark-2 uppercase tracking-wider px-3 py-2">主导航</li>
          
          <li>
            <a href="dashboard.html" class="flex items-center px-3 py-2.5 text-sm rounded-lg text-dark hover:bg-light-1 group transition-all duration-300">
              <i class="fa fa-dashboard w-5 h-5 mr-3 text-dark-2 group-hover:text-dark transition-all duration-300"></i>
              <span>仪表盘</span>
            </a>
          </li>
          
          <li>
            <a href="tenants.html" class="flex items-center px-3 py-2.5 text-sm rounded-lg text-dark hover:bg-light-1 group transition-all duration-300">
              <i class="fa fa-building-o w-5 h-5 mr-3 text-dark-2 group-hover:text-dark transition-all duration-300"></i>
              <span>租户管理</span>
            </a>
          </li>
          
          <li>
            <a href="resources.html" class="flex items-center px-3 py-2.5 text-sm rounded-lg text-dark hover:bg-light-1 group transition-all duration-300">
              <i class="fa fa-server w-5 h-5 mr-3 text-dark-2 group-hover:text-dark transition-all duration-300"></i>
              <span>资源监控</span>
            </a>
          </li>
          
          <li>
            <a href="users.html" class="flex items-center px-3 py-2.5 text-sm rounded-lg text-dark hover:bg-light-1 group transition-all duration-300">
              <i class="fa fa-users w-5 h-5 mr-3 text-dark-2 group-hover:text-dark transition-all duration-300"></i>
              <span>用户管理</span>
            </a>
          </li>
          
          <li>
            <a href="notifications.html" class="flex items-center px-3 py-2.5 text-sm rounded-lg text-dark hover:bg-light-1 group transition-all duration-300">
              <i class="fa fa-bell-o w-5 h-5 mr-3 text-dark-2 group-hover:text-dark transition-all duration-300"></i>
              <span>通知中心</span>
              <span class="ml-auto bg-danger text-white text-xs px-1.5 py-0.5 rounded-full">3</span>
            </a>
          </li>
          
          <li class="mt-6 text-xs font-semibold text-dark-2 uppercase tracking-wider px-3 py-2">系统设置</li>
          
          <li>
            <a href="packages.html" class="flex items-center px-3 py-2.5 text-sm rounded-lg text-dark hover:bg-light-1 group transition-all duration-300">
              <i class="fa fa-tags w-5 h-5 mr-3 text-dark-2 group-hover:text-dark transition-all duration-300"></i>
              <span>套餐管理</span>
            </a>
          </li>
          
          <li>
            <a href="security.html" class="flex items-center px-3 py-2.5 text-sm rounded-lg bg-primary/10 text-primary group transition-all duration-300">
              <i class="fa fa-shield w-5 h-5 mr-3"></i>
              <span>安全设置</span>
            </a>
          </li>
          
          <li>
            <a href="logs.html" class="flex items-center px-3 py-2.5 text-sm rounded-lg text-dark hover:bg-light-1 group transition-all duration-300">
              <i class="fa fa-file-text-o w-5 h-5 mr-3 text-dark-2 group-hover:text-dark transition-all duration-300"></i>
              <span>操作日志</span>
            </a>
          </li>
          
          <li>
            <a href="configurations.html" class="flex items-center px-3 py-2.5 text-sm rounded-lg text-dark hover:bg-light-1 group transition-all duration-300">
              <i class="fa fa-key w-5 h-5 mr-3 text-dark-2 group-hover:text-dark transition-all duration-300"></i>
              <span>配置管理</span>
            </a>
          </li>
        </ul>
      </nav>
      
      <div class="absolute bottom-0 left-0 right-0 p-4 border-t border-light-2">
        <div class="bg-light-1 rounded-lg p-3">
          <div class="flex items-center justify-between mb-2">
            <span class="text-xs text-dark-2">存储空间</span>
            <span class="text-xs font-medium">18.5GB / 50GB</span>
          </div>
          <div class="h-1.5 bg-light-2 rounded-full overflow-hidden">
            <div class="h-full bg-primary rounded-full progress-bar" style="width: 37%"></div>
          </div>
          <button class="mt-2 w-full text-xs bg-primary/10 text-primary py-1.5 rounded hover:bg-primary/20 transition-all duration-300">
            升级存储空间
          </button>
        </div>
      </div>
    </aside>

    <!-- 主内容区 -->
    <div class="flex-1 md:ml-64 transition-all duration-300">
      <!-- 顶部导航栏 -->
      <header class="bg-white shadow-sm sticky top-0 z-20">
        <div class="flex items-center justify-between p-4">
          <div class="flex items-center">
            <button id="toggle-sidebar" class="mr-4 text-dark-2 hover:text-primary md:hidden">
              <i class="fa fa-bars text-xl"></i>
            </button>
            <div class="relative">
              <input type="text" placeholder="搜索安全设置..." class="pl-10 pr-4 py-2 rounded-lg bg-light-1 text-sm w-64 focus:outline-none focus:ring-2 focus:ring-primary/30">
              <i class="fa fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-dark-2"></i>
            </div>
          </div>
          
          <div class="flex items-center space-x-4">
            <div class="relative">
              <button id="notification-btn" class="w-10 h-10 rounded-full flex items-center justify-center hover:bg-light-1 relative transition-all duration-300">
                <i class="fa fa-bell-o text-dark-2"></i>
                <span class="absolute top-1 right-1 w-2 h-2 bg-danger rounded-full"></span>
              </button>
              
              <div id="notification-dropdown" class="absolute right-0 mt-2 w-80 bg-white rounded-lg shadow-dropdown p-3 hidden animate-fade-in z-50">
                <div class="flex justify-between items-center mb-3">
                  <h3 class="font-medium">通知消息</h3>
                  <a href="notifications.html" class="text-xs text-primary hover:text-primary/80 transition-all duration-300">查看全部</a>
                </div>
                
                <div class="space-y-3 max-h-96 overflow-y-auto">
                  <div class="p-3 bg-primary/5 rounded-lg border-l-2 border-primary cursor-pointer hover:bg-primary/10 transition-all duration-300">
                    <div class="flex justify-between">
                      <p class="text-sm font-medium">租户资源预警</p>
                      <span class="text-xs text-dark-2">10分钟前</span>
                    </div>
                    <p class="text-xs text-dark-2 mt-1">租户"云帆科技"的存储空间已使用超过80%，建议升级套餐。</p>
                  </div>
                  
                  <div class="p-3 bg-primary/5 rounded-lg border-l-2 border-primary cursor-pointer hover:bg-primary/10 transition-all duration-300">
                    <div class="flex justify-between">
                      <p class="text-sm font-medium">新租户注册</p>
                      <span class="text-xs text-dark-2">1小时前</span>
                    </div>
                    <p class="text-xs text-dark-2 mt-1">租户"星辰教育"已完成注册，等待审核。</p>
                  </div>
                  
                  <div class="p-3 hover:bg-light-1 rounded-lg transition-all duration-300 cursor-pointer">
                    <div class="flex justify-between">
                      <p class="text-sm font-medium">系统维护通知</p>
                      <span class="text-xs text-dark-2">昨天</span>
                    </div>
                    <p class="text-xs text-dark-2 mt-1">本周六凌晨2点至4点将进行系统维护，期间服务可能中断。</p>
                  </div>
                </div>
              </div>
            </div>
            
            <button class="w-10 h-10 rounded-full flex items-center justify-center hover:bg-light-1 transition-all duration-300">
              <i class="fa fa-question text-dark-2"></i>
            </button>
            
            <div class="relative">
              <button id="user-menu-btn" class="flex items-center space-x-2">
                <div class="w-9 h-9 rounded-full overflow-hidden border-2 border-transparent hover:border-primary transition-all duration-300">
                  <img src="https://picsum.photos/id/1012/200/200" alt="管理员头像" class="w-full h-full object-cover">
                </div>
                <div class="hidden md:block text-left">
                  <p class="text-sm font-medium">张管理员</p>
                  <p class="text-xs text-dark-2">超级管理员</p>
                </div>
                <i class="fa fa-angle-down text-dark-2 hidden md:block"></i>
              </button>
              
              <div id="user-dropdown" class="absolute right-0 mt-2 w-48 bg-white rounded-lg shadow-dropdown p-2 hidden animate-fade-in z-50">
                <a href="profile.html" class="block px-3 py-2 text-sm hover:bg-light-1 rounded transition-all duration-300">
                  <i class="fa fa-user-o mr-2 text-dark-2"></i>个人资料
                </a>
                <a href="account-settings.html" class="block px-3 py-2 text-sm hover:bg-light-1 rounded transition-all duration-300">
                  <i class="fa fa-cog mr-2 text-dark-2"></i>账户设置
                </a>
                <div class="border-t border-light-2 my-1"></div>
                <a href="login.html" class="block px-3 py-2 text-sm text-danger hover:bg-danger/10 rounded transition-all duration-300">
                  <i class="fa fa-sign-out mr-2"></i>退出登录
                </a>
              </div>
            </div>
          </div>
        </div>
      </header>

      <!-- 页面内容 -->
      <main class="p-4 md:p-6">
        <!-- 页面标题和操作 -->
        <div class="mb-6 animate-fade-in flex flex-col md:flex-row md:items-center justify-between gap-4">
          <div>
            <h2 class="text-[clamp(1.5rem,3vw,2rem)] font-bold text-dark">安全设置</h2>
            <p class="text-dark-2 mt-1">管理系统安全策略和访问控制</p>
          </div>
          
          <div class="flex space-x-3">
            <button class="bg-light-1 text-dark hover:bg-light-2 text-sm px-4 py-2 rounded-lg transition-all duration-300 flex items-center">
              <i class="fa fa-history mr-2"></i>
              <span>安全日志</span>
            </button>
            
            <button id="save-settings-btn" class="bg-primary text-white text-sm px-4 py-2 rounded-lg hover:bg-primary/90 transition-all duration-300 flex items-center">
              <i class="fa fa-save mr-2"></i>
              <span>保存设置</span>
            </button>
          </div>
        </div>

        <!-- 安全概览 -->
        <div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-6">
          <div class="bg-white rounded-xl shadow-card p-5 animate-slide-in">
            <div class="flex items-center justify-between">
              <div>
                <p class="text-sm text-dark-2">安全评分</p>
                <p class="text-2xl font-bold text-dark mt-1">92/100</p>
                <p class="text-xs text-success mt-1">优秀</p>
              </div>
              <div class="w-12 h-12 bg-success/10 rounded-full flex items-center justify-center">
                <i class="fa fa-shield text-success text-xl"></i>
              </div>
            </div>
          </div>
          
          <div class="bg-white rounded-xl shadow-card p-5 animate-slide-in">
            <div class="flex items-center justify-between">
              <div>
                <p class="text-sm text-dark-2">失败登录</p>
                <p class="text-2xl font-bold text-dark mt-1">23</p>
                <p class="text-xs text-warning mt-1">本月</p>
              </div>
              <div class="w-12 h-12 bg-warning/10 rounded-full flex items-center justify-center">
                <i class="fa fa-exclamation-triangle text-warning text-xl"></i>
              </div>
            </div>
          </div>
          
          <div class="bg-white rounded-xl shadow-card p-5 animate-slide-in">
            <div class="flex items-center justify-between">
              <div>
                <p class="text-sm text-dark-2">双因素认证</p>
                <p class="text-2xl font-bold text-dark mt-1">85%</p>
                <p class="text-xs text-info mt-1">已启用</p>
              </div>
              <div class="w-12 h-12 bg-info/10 rounded-full flex items-center justify-center">
                <i class="fa fa-lock text-info text-xl"></i>
              </div>
            </div>
          </div>
          
          <div class="bg-white rounded-xl shadow-card p-5 animate-slide-in">
            <div class="flex items-center justify-between">
              <div>
                <p class="text-sm text-dark-2">最后审计</p>
                <p class="text-2xl font-bold text-dark mt-1">7天</p>
                <p class="text-xs text-success mt-1">正常</p>
              </div>
              <div class="w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center">
                <i class="fa fa-check-circle text-primary text-xl"></i>
              </div>
            </div>
          </div>
        </div>

        <!-- 安全设置卡片 -->
        <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6">
          <!-- 认证设置 -->
          <div class="bg-white rounded-xl shadow-card p-6 animate-slide-in">
            <h3 class="font-semibold text-lg mb-4 flex items-center">
              <i class="fa fa-user-shield text-primary mr-2"></i>
              认证设置
            </h3>
            
            <div class="space-y-4">
              <div class="flex items-center justify-between">
                <div>
                  <p class="font-medium">双因素认证</p>
                  <p class="text-sm text-dark-2">为所有用户启用双因素认证</p>
                </div>
                <label class="relative inline-flex items-center cursor-pointer">
                  <input type="checkbox" class="sr-only peer" checked>
                  <div class="w-11 h-6 bg-light-2 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-primary"></div>
                </label>
              </div>
              
              <div class="flex items-center justify-between">
                <div>
                  <p class="font-medium">密码策略</p>
                  <p class="text-sm text-dark-2">强制使用强密码</p>
                </div>
                <label class="relative inline-flex items-center cursor-pointer">
                  <input type="checkbox" class="sr-only peer" checked>
                  <div class="w-11 h-6 bg-light-2 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-primary"></div>
                </label>
              </div>
              
              <div class="flex items-center justify-between">
                <div>
                  <p class="font-medium">会话超时</p>
                  <p class="text-sm text-dark-2">30分钟后自动登出</p>
                </div>
                <label class="relative inline-flex items-center cursor-pointer">
                  <input type="checkbox" class="sr-only peer" checked>
                  <div class="w-11 h-6 bg-light-2 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-primary"></div>
                </label>
              </div>
            </div>
          </div>
          
          <!-- 访问控制 -->
          <div class="bg-white rounded-xl shadow-card p-6 animate-slide-in">
            <h3 class="font-semibold text-lg mb-4 flex items-center">
              <i class="fa fa-key text-primary mr-2"></i>
              访问控制
            </h3>
            
            <div class="space-y-4">
              <div class="flex items-center justify-between">
                <div>
                  <p class="font-medium">IP白名单</p>
                  <p class="text-sm text-dark-2">限制访问IP范围</p>
                </div>
                <label class="relative inline-flex items-center cursor-pointer">
                  <input type="checkbox" class="sr-only peer">
                  <div class="w-11 h-6 bg-light-2 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-primary"></div>
                </label>
              </div>
              
              <div class="flex items-center justify-between">
                <div>
                  <p class="font-medium">API访问限制</p>
                  <p class="text-sm text-dark-2">限制API调用频率</p>
                </div>
                <label class="relative inline-flex items-center cursor-pointer">
                  <input type="checkbox" class="sr-only peer" checked>
                  <div class="w-11 h-6 bg-light-2 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-primary"></div>
                </label>
              </div>
              
              <div class="flex items-center justify-between">
                <div>
                  <p class="font-medium">审计日志</p>
                  <p class="text-sm text-dark-2">记录所有操作日志</p>
                </div>
                <label class="relative inline-flex items-center cursor-pointer">
                  <input type="checkbox" class="sr-only peer" checked>
                  <div class="w-11 h-6 bg-light-2 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-primary"></div>
                </label>
              </div>
            </div>
          </div>
        </div>

        <!-- 安全审计 -->
        <div class="bg-white rounded-xl shadow-card overflow-hidden animate-slide-in">
          <div class="p-5 border-b border-light-2">
            <h3 class="font-semibold">安全审计日志</h3>
          </div>
          
          <div class="overflow-x-auto">
            <table class="w-full">
              <thead>
                <tr class="border-b border-light-2">
                  <th class="text-left py-3 px-4 text-xs font-semibold text-dark-2 uppercase tracking-wider">时间</th>
                  <th class="text-left py-3 px-4 text-xs font-semibold text-dark-2 uppercase tracking-wider">用户</th>
                  <th class="text-left py-3 px-4 text-xs font-semibold text-dark-2 uppercase tracking-wider">操作</th>
                  <th class="text-left py-3 px-4 text-xs font-semibold text-dark-2 uppercase tracking-wider">IP地址</th>
                  <th class="text-left py-3 px-4 text-xs font-semibold text-dark-2 uppercase tracking-wider">状态</th>
                </tr>
              </thead>
              <tbody>
                <tr class="border-b border-light-2 table-row-hover">
                  <td class="py-3 px-4 text-sm">2025-09-24 14:30</td>
                  <td class="py-3 px-4">
                    <div class="flex items-center">
                      <div class="w-6 h-6 rounded-full overflow-hidden mr-2">
                        <img src="https://picsum.photos/id/1012/200/200" alt="张管理员" class="w-full h-full object-cover">
                      </div>
                      <span class="text-sm">张管理员</span>
                    </div>
                  </td>
                  <td class="py-3 px-4 text-sm">修改安全设置</td>
                  <td class="py-3 px-4 text-sm">192.168.1.100</td>
                  <td class="py-3 px-4">
                    <span class="text-xs bg-success/10 text-success px-2 py-1 rounded-full">成功</span>
                  </td>
                </tr>
                
                <tr class="border-b border-light-2 table-row-hover">
                  <td class="py-3 px-4 text-sm">2025-09-24 13:45</td>
                  <td class="py-3 px-4">
                    <div class="flex items-center">
                      <div class="w-6 h-6 rounded-full overflow-hidden mr-2">
                        <img src="https://picsum.photos/id/1027/200/200" alt="李工" class="w-full h-full object-cover">
                      </div>
                      <span class="text-sm">李工</span>
                    </div>
                  </td>
                  <td class="py-3 px-4 text-sm">登录失败</td>
                  <td class="py-3 px-4 text-sm">192.168.1.101</td>
                  <td class="py-3 px-4">
                    <span class="text-xs bg-danger/10 text-danger px-2 py-1 rounded-full">失败</span>
                  </td>
                </tr>
                
                <tr class="border-b border-light-2 table-row-hover">
                  <td class="py-3 px-4 text-sm">2025-09-24 12:20</td>
                  <td class="py-3 px-4">
                    <div class="flex items-center">
                      <div class="w-6 h-6 rounded-full overflow-hidden mr-2">
                        <img src="https://picsum.photos/id/1012/200/200" alt="张管理员" class="w-full h-full object-cover">
                      </div>
                      <span class="text-sm">张管理员</span>
                    </div>
                  </td>
                  <td class="py-3 px-4 text-sm">查看审计日志</td>
                  <td class="py-3 px-4 text-sm">192.168.1.100</td>
                  <td class="py-3 px-4">
                    <span class="text-xs bg-success/10 text-success px-2 py-1 rounded-full">成功</span>
                  </td>
                </tr>
              </tbody>
            </table>
          </div>
        </div>
      </main>
      
      <footer class="bg-white border-t border-light-2 py-4 px-6 mt-6">
        <div class="flex flex-col md:flex-row justify-between items-center">
          <p class="text-sm text-dark-2">© 2025 Cencat SaaS 多租户管理平台. 保留所有权利.</p>
          <div class="flex space-x-4 mt-3 md:mt-0">
            <a href="help.html" class="text-sm text-dark-2 hover:text-primary transition-all duration-300">帮助中心</a>
            <a href="terms.html" class="text-sm text-dark-2 hover:text-primary transition-all duration-300">服务条款</a>
            <a href="privacy.html" class="text-sm text-dark-2 hover:text-primary transition-all duration-300">隐私政策</a>
          </div>
        </div>
      </footer>
    </div>
  </div>

  <script>
    document.addEventListener('DOMContentLoaded', function() {
      // 侧边栏切换
      const sidebar = document.getElementById('sidebar');
      const toggleSidebar = document.getElementById('toggle-sidebar');
      const closeSidebar = document.getElementById('close-sidebar');
      
      toggleSidebar.addEventListener('click', function() {
        sidebar.classList.toggle('-translate-x-full');
      });
      
      closeSidebar.addEventListener('click', function() {
        sidebar.classList.add('-translate-x-full');
      });
      
      // 通知下拉框
      const notificationBtn = document.getElementById('notification-btn');
      const notificationDropdown = document.getElementById('notification-dropdown');
      
      notificationBtn.addEventListener('click', function(e) {
        e.stopPropagation();
        notificationDropdown.classList.toggle('hidden');
        userDropdown.classList.add('hidden');
      });
      
      // 用户下拉框
      const userMenuBtn = document.getElementById('user-menu-btn');
      const userDropdown = document.getElementById('user-dropdown');
      
      userMenuBtn.addEventListener('click', function(e) {
        e.stopPropagation();
        userDropdown.classList.toggle('hidden');
        notificationDropdown.classList.add('hidden');
      });
      
      document.addEventListener('click', function() {
        notificationDropdown.classList.add('hidden');
        userDropdown.classList.add('hidden');
      });
      
      // 保存设置按钮
      const saveSettingsBtn = document.getElementById('save-settings-btn');
      saveSettingsBtn.addEventListener('click', function() {
        alert('安全设置已保存');
      });
    });
  </script>
</body>
</html>